export interface Point {
    lng: number | string;
    lat: number | string;
};

export interface Icon {
    url: string;
    width: number;
    height: number;
    options?: object;
};

export interface Label {
    type?: string;
    state: string; // label状态：add.添加，remove.移除，show.显示，hide.隐藏
    point: Point,
    content: string;
    options?: object;
    style: object;
    data?: object;
};

export interface MarkerData {
    lng: string | number;
    lat: string | number;
};

export interface Marker {
    type?: string;
    point: Point,
    icon?: Icon;
    label?: Label;
    options?: object;
};

export interface Circle {
    type?: string;
    point: Point,
    radius: number;
    options: object;
};

export interface MapvglPointData {
    lng: string | number;
    lat: string | number;
};

export interface MapvglPoint {
    type?: string;
    options: object;
    data: Array<MapvglPointData>,
};

export interface MapvglIconData {
    id: string | number;
    name: string;
    lng: string | number;
    lat: string | number;
};

export interface MapvglIcon {
    type?: string;
    img: string;
    width: number;
    height: number;
    data: Array<MapvglIconData>,
};

export interface MapvglLabelData {
    id: string | number;
    name: string;
    lng: string | number;
    lat: string | number;
    text: string;
};

export interface MapvglLabel {
    type?: string;
    options: object;
    data: Array<MapvglLabelData>,
};

export interface MapvglHeatmapData {
    lng: string | number;
    lat: string | number;
    count: number,
};

export interface MapvglHeatmap {
    options: object,
    data: Array<MapvglHeatmapData>,
};

// export class Size {
//     width: number = 0;
//     height: number = 0;
// }

// export class Point {
//     lng: number = 0;
//     lat: number = 0;
// }

// export class Label {
//     content: string = '';
//     offset?: Size;
// }

// export class Icon {
//     imageUrl: string = '';
//     size: Size = new Size();
//     anchor?: Size;
// }

// export class Overlay {
//     point?: Point;
//     draw(): void;
//     addEventListener(event: string, handler: () => void): void;
//     removeEventListener(event: string, handler: () => void): void;
// }

// export class Marker extends Overlay {
//     label?: Label;
//     icon?: Icon;
//     getPosition(): Point;
//     setPosition(position: Point): void;
// }

// export class Control {
//     defaultAnchor: string = '';
//     defaultOffset: Size = new Size();
// }

// export abstract class Map {
//     // container: string | HTMLElement = '';
//     // center:Point = new Point();
//     // zoom: number = 0;
//     // centerAndZoom = (center: Point, zoom: number) => {
//     //     this.center = center;
//     //     this.zoom = zoom;
//     // };
//     // enableScrollWheelZoom = () => {};
//     // enableInertialDragging = () => {};
//     // disableDoubleClickZoom = () => {};
//     // disableRotateGestures = () => {};
//     // addControl = (control: Control) => {};
//     // removeControl = (control: Control) => {};
//     // addOverlay = (overlay: Overlay) => {};
//     // removeOverlay = (overlay: Overlay) => {};
//     // clearOverlays = () => {};
//     // addEventListener = (event: string, handler: () => void) => {};
// }

// export interface BMap {
//     Size: Size;
//     Point: Point;
//     Label: Label;
//     Icon: Icon;
//     Overlay: Overlay;
//     Marker: Marker;
//     Control: Control;
//     Map: Map;
// }
